import tool from '@/common/tool'
import { buildPage } from './buildPage.js'
import chunk from './pathApi'
let routerAll = []
routerAll = tool.deepClone(buildPage)
routerAll.forEach((item) => {
  item.meta.sideBar = false
})
let router = [
  {
    path: '/work',
    component: chunk.modules('middleView'),
    name: 'work',
    meta: {
      icon: 'icon-icon_staging',
      title: '工作台',
      sideBar: true,
      ifNocholdren: true,
      isbuild: 'nobuildpage',
      permissionCode: '0300000000'
    },
    redirect: 'work/workPage',
    children: [
      {
        path: 'workPage',
        name: 'workPage',
        component: chunk.modules('workPage/index'),
        meta: {
          title: '工作台',
          sideBar: false,
          parentPath: '/work',
          keepAlive: true,
          isbuild: 'nobuildpage',
          noAuthor: true //是否需要权限
        }
      },
      {
        path: 'taskListPageWork',
        name: 'taskListPageWork',
        component: chunk.buildingHome('UdealProcess/taskListPage'),
        meta: {
          title: '工作台任务',
          sideBar: false,
          parentPath: '/work',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          keepAlive: true
        }
      },
      {
        path: 'appealPage',
        name: 'appealPage',
        component: chunk.modules('workPage/appealPage'),
        meta: {
          title: '0分申诉',
          sideBar: false,
          parentPath: '/work',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          keepAlive: true
        }
      },
      {
        path: 'appealDetailWork',
        component: chunk.reportCenter('controlReport/appealDetail'),
        name: 'appealDetailWork',
        meta: {
          auth: false,
          title: '申诉详情',
          parentPath: '/work',
          sideBar: false,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'outsideCustomerVisit',
        name: 'outsideCustomerVisit',
        component: chunk.modules('workPage/outsideCustomerVisit/outsideCustomerVisit'),
        meta: {
          title: '来人数据穿透',
          sideBar: false,
          parentPath: '/work',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // keepAlive: true
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'clueStatistical',
        name: 'clueStatistical',
        component: chunk.modules('workPage/clueStatistical/clueStatistical'),
        meta: {
          title: '线索数据穿透',
          sideBar: false,
          parentPath: '/work',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // keepAlive: true
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'subscribeSign',
        name: 'subscribeSign',
        component: chunk.modules('workPage/subscribeSign/subscribeSign'),
        meta: {
          title: '认购签约',
          sideBar: false,
          parentPath: '/work',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // keepAlive: true
          // permissionCode: '0101000000'
        }
      }
    ]
  },
  {
    path: '/home',
    component: chunk.modules('middleView'),
    name: 'home',
    meta: {
      icon: 'icon-icon_list',
      title: '案场列表',
      sideBar: true,
      ifNocholdren: true,
      noAuthor: true, //是否需要权限
      isbuild: 'nobuildpage'
    },
    redirect: 'home/crimeSceneList',
    children: [
      {
        path: 'crimeSceneList',
        name: 'crimeSceneList',
        component: chunk.modules('crimeSceneList/crimeSceneList'),
        meta: {
          title: '案场列表',
          sideBar: false,
          parentPath: '/home',
          keepAlive: true,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          permissionCode: '0100000000'
        }
      },
      {
        path: 'caseRecord',
        name: 'caseRecord',
        component: chunk.modules('crimeSceneList/caseRecord'),
        meta: {
          title: '案场调整记录',
          sideBar: false,
          parentPath: '/home',
          // keepAlive: true,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
        }
      },
      {
        path: 'adjustmentCase',
        name: 'adjustmentCase',
        component: chunk.modules('crimeSceneList/adjustmentCase'),
        meta: {
          title: '批量调整案场所属',
          sideBar: false,
          parentPath: '/home',
          // keepAlive: true,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
        }
      }
    ]
  },
  {
    //待办任务
    path: '/Udeal',
    component: chunk.modules('middleView'),
    name: 'Udeal',
    meta: {
      icon: 'icon-icon_list',
      title: '待办任务',
      sideBar: false,
      ifNocholdren: true,
      noAuthor: true, //是否需要权限
      isbuild: 'nobuildpage'
    },
    redirect: 'Udeal/UdealTask',
    children: [
      {
        path: 'UdealTask',
        name: 'UdealTask',
        component: chunk.modules('UdealTask/index'),
        meta: {
          title: '待办任务',
          sideBar: false,
          parentPath: '/Udeal',
          keepAlive: true,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          permissionCode: '0113000000'
        }
      }
    ]
  },
  // 后台管理
  {
    path: '/backStage',
    component: chunk.modules('middleView'),
    name: 'backStage',
    meta: {
      title: '后台管理',
      icon: 'icon-icon_back',
      sideBar: true,

      isbuild: 'nobuildpage',
      permissionCode: '0200000000'
    },
    children: [
      {
        path: 'organization/organList',
        name: 'organList',
        component: chunk.backStage('organization/organList'),
        meta: {
          title: '组织管理',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0201000000'
        }
      },
      {
        path: 'organization/adjust',
        name: 'adjustAffiliation',
        component: chunk.backStage('organization/adjust/index'),
        meta: {
          title: '调整人员所属',
          parentPath: '/backStage/organization/organList',
          isbuild: 'nobuildpage',
          noAuthor: true
        }
      },
      {
        path: 'organization/adjust/record',
        name: 'adjustRecord',
        component: chunk.backStage('organization/adjust/record'),
        meta: {
          title: '人员调整记录',
          parentPath: '/backStage/organization/adjust',
          isbuild: 'nobuildpage',
          noAuthor: true
        }
      },
      {
        path: 'postManagement',
        name: 'postManagement',
        component: chunk.backStage('postManagement/index'),
        meta: {
          title: '岗位管理 ',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0211000000'
        }
      },
      {
        path: 'organizationBusiness',
        name: 'organizationBusiness',
        component: chunk.backStage('organizationBusiness/business'),
        meta: {
          title: '组织架构管理',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0204040000'
        }
      },
      {
        path: 'scopeDeployPage',
        component: chunk.backStage('organizationBusiness/scopeDeployPage'),
        name: 'scopeDeployPage',
        meta: {
          auth: false,
          title: '人员异动范围配置',
          noAuthor: true, //是否需要权限
          sideBar: false,
          parentPath: '/backStage/organizationBusiness',
          isbuild: 'nobuildpage'
        }
      },
      {
        path: 'roleControl/roleList',
        name: 'roleList',
        component: chunk.backStage('roleControl/roleList'),
        meta: {
          title: '角色管理',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0202000000'
        }
      },

      {
        path: 'standBook/standBookList',
        name: 'standBookList',
        component: chunk.backStage('standBook/standBookList'),
        meta: {
          title: '台账设置',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0203000000'
        }
      },
      {
        path: 'caseRate',
        name: 'caseRate',
        component: chunk.backStage('caseRate/caseRate'),
        meta: {
          title: '案场评级配置',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0204140000'
        }
      },

      {
        path: 'avatar',
        name: 'avatar',
        component: chunk.backStage('avatar/avatar'),
        meta: {
          title: '头像管理',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0204150000'
        }
      },
      {
        path: 'authority',
        component: chunk.modules('middleView'),
        name: 'authority',
        meta: {
          title: '权限管理',
          icon: 'md-cube',
          sideBar: true,

          isbuild: 'nobuildpage',
          permissionCode: '0205000000'
        },
        children: [
          {
            path: 'navigationMenu',
            component: chunk.backStage('authority/navigationMenu/navigationMenu'),
            name: 'navigationMenu',
            meta: {
              title: '功能菜单管理',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0205010000'
            }
          },
          {
            path: 'functionalAuthority',
            component: chunk.backStage('authority/functionalAuthority/functionalAuthority'),
            name: 'functionalAuthority',
            meta: {
              title: '功能权限管理',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0205020000'
            }
          }
        ]
      },
      {
        path: 'cityConfigure',
        component: chunk.modules('middleView'),
        name: 'cityConfigure',
        meta: {
          title: '配置中心',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0204000000'
        },
        children: [
          {
            path: 'cityConfigurationList',
            component: chunk.backStage('cityConfiguration/cityConfigurationList'),
            name: 'cityConfigurationList',
            meta: {
              auth: false,
              title: '通用配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204010000'
            }
          },
          {
            path: 'cityConfigurationDetail',
            component: chunk.backStage('cityConfiguration/cityConfigurationDetail'),
            name: 'cityConfigurationDetail',
            meta: {
              auth: false,
              title: '城市配置详情',
              noAuthor: true, //是否需要权限
              sideBar: false,
              parentPath: '/backStage/cityConfigure/cityConfigurationList',
              isbuild: 'nobuildpage'
              // permissionCode: '0204010000'
            }
          },
          {
            path: 'cityChannelConfigure',
            component: chunk.backStage('cityConfiguration/cityChannelConfigure'),
            name: 'cityChannelConfigure',
            meta: {
              auth: false,
              title: '渠道配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204020000'
            }
          },
          {
            path: 'interestRateConfig/rateList',
            name: 'rateList',
            component: chunk.backStage('interestRateConfig/rateList'),
            meta: {
              title: '基础利率配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204030000'
              //暂无
            }
          },
          {
            path: 'processManagement',
            name: 'processManagement',
            component: chunk.flowApproval('processManagement/index'),
            meta: {
              title: '流程管理',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204050000'
            }
          },
          {
            path: 'backgroundMap',
            component: chunk.backStage('backgroundMap/backgroundMap'),
            name: 'backgroundMap',
            meta: {
              auth: false,
              title: '霸屏神器模板维护',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204060000'
            }
          },
          {
            path: 'companySop',
            name: 'companySop',
            component: chunk.backStage('companySop/index'),
            meta: {
              title: 'Sop配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204070000'
            }
          },
          {
            path: 'protectSop',
            name: 'protectSop',
            component: chunk.backStage('protectSop/index'),
            meta: {
              title: '保护期配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204100000'
            }
          },
          {
            path: 'robSop',
            name: 'robSop',
            component: chunk.backStage('robSop/index'),
            meta: {
              title: '抢客配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204110000'
            }
          },
          {
            path: 'appMenuConfig',
            name: 'appMenuConfig',
            component: chunk.backStage('appMenuConfig/index'),
            meta: {
              title: 'APP菜单配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204090000'
            }
          },
          {
            path: 'advertisement',
            name: 'advertisement',
            component: chunk.backStage('advertisement/index'),
            meta: {
              title: '广告位配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204120000'
            }
          },
          {
            path: 'createAd',
            component: chunk.backStage('advertisement/createAd'),
            name: 'createAd',
            meta: {
              title: '新增/编辑广告',
              parentPath: '/backStage/cityConfigure/advertisement',
              isbuild: 'nobuildpage',
              permissionCode: '0204120000'
            }
          },
          {
            path: 'bonusConfig',
            name: 'bonusConfig',
            component: chunk.backStage('bonusConfig/index'),
            meta: {
              title: '奖金配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0204130000'
            }
          }
        ]
      },
      {
        path: 'message',
        component: chunk.modules('middleView'),
        name: 'message',
        meta: {
          title: '消息管理',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0209000000'
        },
        children: [
          {
            path: 'messageLog',
            name: 'messageLog',
            component: chunk.backStage('message/messageLog/index'),
            meta: {
              title: '消息记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0209000000'
            }
          },
          {
            path: 'addEditmessage',
            component: chunk.backStage('message/messageLog/addEditmessage'),
            name: 'addEditmessage',
            meta: {
              title: '创建/编辑消息',
              parentPath: '/backStage/message/messageLog',
              isbuild: 'nobuildpage',
              permissionCode: '0209000000'
            }
          },
          {
            path: 'messageDetail',
            component: chunk.backStage('message/messageLog/messageDetail'),
            name: 'messageDetail',
            meta: {
              title: '消息详情',
              parentPath: '/backStage/message/messageLog',
              isbuild: 'nobuildpage',
              permissionCode: '0209000000'
            }
          }
        ]
      },
      {
        path: 'companyCard',
        component: chunk.modules('middleView'),
        name: 'companyCard',
        meta: {
          title: '名片管理',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0212000000'
        },
        children: [
          {
            path: 'companyManagement',
            name: 'companyManagement',
            component: chunk.backStage('companyCard/companyManagement/index'),
            meta: {
              title: '公司信息管理',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0212010000'
            }
          },
          {
            path: 'companyDetail',
            name: 'companyDetail',
            component: chunk.backStage('companyCard/companyManagement/companyDetail'),
            meta: {
              title: '公司信息管理',
              isbuild: 'nobuildpage',
              parentPath: '/backStage/companyCard/companyManagement',
              permissionCode: '0212010000'
            }
          },
          {
            path: 'companyCardLog',
            name: 'companyCardLog',
            component: chunk.backStage('companyCard/companyCardLog/index'),
            meta: {
              title: '名片创建记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0212020000'
            }
          }
        ]
      }
    ]
  },
  // 业务报表
  {
    path: '/reportCenter',
    component: chunk.modules('middleView'),
    name: 'reportCenter',
    meta: {
      title: '报表中心',
      icon: 'icon-icon_date_center',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0207000000'
    },
    children: [
      {
        path: 'marketingStatistics',
        component: chunk.modules('middleView'),
        name: 'marketingStatistics',
        meta: {
          title: '营销统计',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0207030000'
        },
        children: [
          {
            path: 'casePosterStatistics',
            name: 'casePosterStatistics',
            component: chunk.reportCenter('marketingStatistics/casePosterStatistics/index'),
            meta: {
              title: '海报统计（案场）',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030100'
            }
          },
          {
            path: 'userPosterStatistics',
            name: 'userPosterStatistics',
            component: chunk.reportCenter('marketingStatistics/userPosterStatistics/index'),
            meta: {
              title: '海报统计（顾问）',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030100'
            }
          },
          {
            path: 'importArticleLog',
            name: 'importArticleLog',
            component: chunk.reportCenter('marketingStatistics/importArticleLog'),
            meta: {
              title: '文章导入记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030300'
            }
          },
          {
            path: 'noteLog',
            name: 'noteLog',
            component: chunk.reportCenter('marketingStatistics/noteLog'),
            meta: {
              title: '置业笔记创建记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030700'
            }
          },
          {
            path: 'shortArticalStatistics',
            name: 'shortArticalStatistics',
            component: chunk.reportCenter('marketingStatistics/shortArticalStatistics/index'),
            meta: {
              title: '霸屏神器统计表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030200'
            }
          },
          {
            path: 'shortArticalSend',
            name: 'shortArticalSend',
            component: chunk.reportCenter('marketingStatistics/shortArticalSend'),
            meta: {
              title: '霸屏神器发送记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030200'
            }
          },
          {
            path: 'tiktokVideo',
            name: 'tiktokVideo',
            component: chunk.reportCenter('marketingStatistics/tiktokVideo'),
            meta: {
              title: '抖音发布统计(视频)',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030400'
            }
          },
          {
            path: 'tiktokAccount',
            name: 'tiktokAccount',
            component: chunk.reportCenter('marketingStatistics/tiktokAccount'),
            meta: {
              title: '抖音发布统计(账号)',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030400'
            }
          },
          {
            path: 'tiktokAccountDetails',
            name: 'tiktokAccountDetails',
            component: chunk.reportCenter('marketingStatistics/tiktokAccountDetails'),
            meta: {
              title: '视频明细',
              parentPath: '/reportCenter/marketingStatistics/tiktokAccount',
              sideBar: false,
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'promotionImplemLog',
            name: 'promotionImplemLog',
            component: chunk.reportCenter('marketingStatistics/promotionImplemLog'),
            meta: {
              title: '推广记录',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030500'
            }
          },
          {
            path: 'promotionImplem',
            name: 'promotionImplem',
            component: chunk.reportCenter('marketingStatistics/promotionImplem'),
            meta: {
              title: '推广执行',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207030600'
            }
          }
        ]
      },
      {
        path: 'controlReport',
        component: chunk.modules('middleView'),
        name: 'controlReport',
        meta: {
          title: '管控报表',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0207010000'
        },
        children: [
          {
            path: 'goalSetStatistics',
            name: 'goalSetStatistics',
            component: chunk.reportCenter('controlReport/goalSetStatistics/goalSetStatistics'),
            meta: {
              // keepAlive: true,
              title: '目标设定统计',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010700'
            }
          },
          {
            path: 'caseRateStatistics',
            name: 'caseRateStatistics',
            component: chunk.reportCenter('controlReport/caseRateStatistics'),
            meta: {
              keepAlive: true,
              title: '案场评级统计',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010600'
            }
          },
          {
            path: 'caseRateDetails',
            component: chunk.backStage('caseRate/caseRateDetails'),
            name: 'caseRateDetails',
            meta: {
              auth: false,
              title: '案场评级详情',
              parentPath: '/reportCenter/controlReport/caseRateStatistics',
              sideBar: false,
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage'
              // permissionCode: '0101000000'
            }
          },
          {
            path: 'salesRiskControl',
            name: 'salesRiskControl',
            component: chunk.reportCenter('controlReport/salesRiskControl'),
            meta: {
              title: '销售风控报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010100'
            }
          },
          {
            path: 'achievementConfirm',
            name: 'achievementConfirm',
            component: chunk.reportCenter('controlReport/achievementConfirm'),
            meta: {
              title: '业绩确认单汇总报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              keepAlive: true,
              permissionCode: '0207010300'
            }
          },
          {
            path: 'caseIntegral',
            name: 'caseIntegral',
            component: chunk.reportCenter('controlReport/caseIntegral'),
            meta: {
              title: '案场积分表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010200'
            }
          },
          {
            path: 'appealDetail',
            component: chunk.reportCenter('controlReport/appealDetail'),
            name: 'appealDetail',
            meta: {
              auth: false,
              title: '申诉详情',
              parentPath: '/reportCenter/controlReport/caseIntegral',
              sideBar: false,
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage'
              // permissionCode: '0101000000'
            }
          },
          {
            path: 'contractWithdrawal',
            name: 'contractWithdrawal',
            component: chunk.reportCenter('controlReport/contractWithdrawal/index'),
            meta: {
              title: '合同及撤场汇总表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010400'
            }
          },
          {
            path: 'commissionConfirm',
            name: 'commissionConfirm',
            component: chunk.reportCenter('controlReport/commissionConfirm/index'),
            meta: {
              title: '佣金确认报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010500'
            }
          },
          {
            path: 'goalReachConfirm',
            name: 'goalReachConfirm',
            component: chunk.reportCenter('controlReport/goalReachReport/index'),
            meta: {
              title: '目标达成统计',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010800'
            }
          },
          {
            path: 'bizPointReport',
            name: 'bizPointReport',
            component: chunk.reportCenter('controlReport/bizPoint/index'),
            meta: {
              title: '商务点数报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207011000'
            }
          },
          {
            path: 'buildingFileReport',
            name: 'buildingFileReport',
            component: chunk.reportCenter('controlReport/buildingFile/index'),
            meta: {
              title: '项目资料清单汇总表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207010900'
            }
          }
        ]
      },

      {
        path: 'businessReport',
        component: chunk.modules('middleView'),
        name: 'businessReport',
        meta: {
          title: '业务报表',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0207020000'
        },
        children: [
          {
            path: 'groupReport',
            name: 'groupReport',
            component: chunk.reportCenter('businessReport/groupReport'),
            meta: {
              title: '集团报表 ',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020100'
            }
          },
          {
            path: 'visitReport',
            name: 'visitReport',
            component: chunk.reportCenter('businessReport/visitReport'),
            meta: {
              title: '来人成交表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020200'
            }
          },
          {
            path: 'contractReport',
            name: 'contractReport',
            component: chunk.reportCenter('businessReport/contractReport'),
            meta: {
              title: '签约统计表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020300'
            }
          },
          {
            path: 'fullPayReport',
            name: 'fullPayReport',
            component: chunk.reportCenter('businessReport/fullPayReport'),
            meta: {
              title: '全款统计表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020600'
            }
          },
          {
            path: 'projectInfoReport',
            name: 'projectInfoReport',
            component: chunk.reportCenter('businessReport/projectInfoReport'),
            meta: {
              title: '项目信息表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020700'
            }
          },
          {
            path: 'achievementReport',
            name: 'achievementReport',
            component: chunk.reportCenter('businessReport/achievementReport'),
            meta: {
              title: '业绩统计表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207020800'
            }
          }
        ]
      },
      {
        path: 'financialReport',
        component: chunk.modules('middleView'),
        name: 'financialReport',
        meta: {
          title: '财务报表',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0207050000'
        },
        children: [
          {
            path: 'commissionReport',
            name: 'commissionReport',
            component: chunk.reportCenter('financialReport/commissionReport/index'),
            meta: {
              title: '项目佣金报表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050200'
            }
          },
          {
            path: 'roomCommissionCollect',
            name: 'roomCommissionCollect',
            component: chunk.reportCenter('financialReport/roomCommissionCollect/index'),
            meta: {
              title: '房源佣金汇总',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050300'
            }
          },
          {
            path: 'incomeCollect',
            name: 'incomeCollect',
            component: chunk.reportCenter('financialReport/incomeCollect/index'),
            meta: {
              title: '结算收入汇总表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207051100'
            }
          },
          {
            path: 'incomeDetail',
            name: 'incomeDetail',
            component: chunk.reportCenter('financialReport/incomeDetail/index'),
            meta: {
              title: '结算收入明细表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050400'
            }
          },
          {
            path: 'roomBonusDetail',
            name: 'roomBonusDetail',
            component: chunk.reportCenter('financialReport/roomBonusDetail/index'),
            meta: {
              title: '房源奖金明细',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050500'
            }
          },
          {
            path: 'incentiveReport',
            name: 'incentiveReport',
            component: chunk.reportCenter('financialReport/incentiveReport/index'),
            meta: {
              title: '在销激励报表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050600'
            }
          },
          {
            path: 'allowanceReport',
            name: 'allowanceReport',
            component: chunk.reportCenter('financialReport/allowanceReport/index'),
            meta: {
              title: '项目津贴报表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050700'
            }
          },
          {
            path: 'JYPushReport',
            name: 'JYPushReport',
            component: chunk.reportCenter('financialReport/JYPushReport/index'),
            meta: {
              title: '嘉扬推送报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050800'
            }
          },
          {
            path: 'bonusSummaryReport',
            name: 'bonusSummaryReport',
            component: chunk.reportCenter('financialReport/bonusSummaryReport/index'),
            meta: {
              title: '奖金代发汇总',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207050900'
            }
          },
          {
            path: 'cusPreReport',
            name: 'cusPreReport',
            component: chunk.reportCenter('financialReport/cusPreReport/index'),
            meta: {
              title: '自获客预发表',
              sideBar: true,
              keepAlive: true,
              isbuild: 'nobuildpage',
              permissionCode: '0207051000'
            }
          }
        ]
      }
    ]
  },
  // 销售中心
  {
    path: '/salesManagement',
    component: chunk.modules('middleView'),
    meta: {
      icon: 'icon-icon_sell_center',
      title: '销售中心',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0208000000'
    },
    name: 'salesManagement',
    children: [
      {
        path: 'subSummary',
        component: chunk.salesManagement('salesSummary/subSummary'),
        name: 'subSummary',
        meta: {
          auth: false,
          title: '认购单汇总',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0208010000'
        }
      },
      {
        path: 'contractSummary',
        component: chunk.salesManagement('salesSummary/contractSummary'),
        name: 'contractSummary',
        meta: {
          auth: false,
          title: '签约单汇总',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0208020000'
        }
      },
      {
        path: 'viewSubscriptionDetail',
        component: chunk.salesManagement('subScription/subscriptionDetail'),
        name: 'viewSubscriptionDetail',
        meta: {
          auth: false,
          title: '认购详情',
          parentPath: '/salesManagement/subSummary',
          sideBar: false,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'viewBackOrderDetail',
        component: chunk.salesManagement('backOrder/backOrderDetail'),
        name: 'viewBackOrderDetail',
        meta: {
          auth: false,
          title: '退购详情',
          parentPath: '/salesManagement/subSummary',
          sideBar: false,
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage'
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'viewContractDetail',
        component: chunk.salesManagement('contractOrder/contractDetail'),
        name: 'viewContractDetail',
        meta: {
          auth: false,
          title: '签约详情',
          sideBar: false,
          noAuthor: true, //是否需要权限
          parentPath: '/salesManagement/contractSummary',
          isbuild: 'nobuildpage'
          // permissionCode: '0101000000'
        }
      },
      {
        path: 'viewRefundOrderDetail',
        component: chunk.salesManagement('refundOrder/refundOrderDetail'),
        name: 'viewRefundOrderDetail',
        meta: {
          auth: false,
          title: '退签详情',
          sideBar: false,
          noAuthor: true, //是否需要权限
          parentPath: '/salesManagement/contractSummary',
          isbuild: 'nobuildpage'
          // permissionCode: '0101000000'
        }
      }
    ]
  },
  // 流程审批
  {
    path: '/flowApproval',
    component: chunk.modules('middleView'),
    name: 'flowApproval',
    meta: {
      title: '流程审批',
      icon: 'icon-icon_approval',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0206000000'
    },
    children: [
      {
        path: 'legalArticleReview',
        name: 'legalArticleReview',
        component: chunk.flowApproval('articleReview/index'),
        meta: {
          title: '置业计划书审核',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206030000'
        }
      },
      {
        path: 'legalViewArticleReview',
        component: chunk.marketingCenter('propertyReport/articleReview/viewArticleReview'),
        name: 'legalViewArticleReview',
        meta: {
          title: '审核文章内容',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          parentPath: '/flowApproval/legalArticleReview'
        }
      },
      {
        path: 'legalAuditLog',
        component: chunk.marketingCenter('propertyReport/articleReview/auditLog'),
        name: 'legalAuditLog',
        meta: {
          title: '文章审核记录',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          parentPath: '/flowApproval/legalViewArticleReview'
        }
      },
      {
        path: 'cardAudit',
        name: 'cardAudit',
        component: chunk.backStage('companyCard/cardAudit/index'),
        meta: {
          title: '名片审核',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206070000'
        }
      },
      {
        path: 'auditDetail',
        component: chunk.backStage('companyCard/cardAudit/auditDetail'),
        name: 'auditDetail',
        meta: {
          title: '名片审核详情',
          noAuthor: true, //是否需要权限
          isbuild: 'nobuildpage',
          parentPath: '/flowApproval/cardAudit'
        }
      },
      {
        path: 'riskControl',
        component: chunk.modules('middleView'),
        name: 'riskControl',
        meta: {
          title: '风控审核',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206020000'
        },
        children: [
          {
            path: 'advanceSaleReview',
            name: 'advanceSaleReview',
            component: chunk.flowApproval('riskControl/advanceSaleReview'),
            meta: {
              title: '提前开售审核',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206020100'
            }
          },
          {
            path: 'companyBasePrice',
            name: 'companyBasePrice',
            component: chunk.flowApproval('companyBasePrice/index'),
            meta: {
              title: '破底价审核',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206080000'
            }
          }
        ]
      },
      {
        path: 'channelAudit',
        component: chunk.modules('middleView'),
        name: 'channelAuditManagement',
        meta: {
          title: '渠道合规审核',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206010000'
        },
        children: [
          {
            path: 'companyAudit',
            name: 'companyAudit',
            component: chunk.flowApproval('channelAudit/companyAudit/index'),
            meta: {
              title: '子公司综管审核',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206010100'
            }
          },
          {
            path: 'businessAudit',
            name: 'businessAudit',
            component: chunk.flowApproval('channelAudit/businessAudit/index'),
            meta: {
              title: '新房事业部审核',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206010200'
            }
          },
          {
            path: 'channelCount',
            name: 'channelCount',
            component: chunk.flowApproval('channelAudit/channelCount/index'),
            meta: {
              title: '渠道结算',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206010300'
            }
          }
        ]
      },
      {
        path: 'bonus',
        component: chunk.modules('middleView'),
        name: 'bonus',
        meta: {
          title: '奖金审批',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206050000'
        },
        children: [
          {
            path: 'billApproval',
            name: 'billApproval',
            component: chunk.bonus('bill/index'),
            meta: {
              title: '奖金单审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050300'
            }
          },
          {
            path: 'billApproval/detail',
            name: 'billApprovalDetail',
            component: chunk.bonus('bill/detail'),
            meta: {
              title: '奖金单审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/bonus/billApproval'
            }
          },
          {
            path: 'templateApproval',
            name: 'templateApproval',
            component: chunk.flowApproval('bonus/template/index'),
            meta: {
              title: '奖金模板审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050100'
            }
          },
          {
            path: 'templateApproval/audit',
            name: 'bonusTemplateAudit',
            component: chunk.bonus('paramConfig/template/detail'),
            meta: {
              title: '奖金模板审批',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'templateApproval/detail',
            name: 'bonusTemplateAuditDetail',
            component: chunk.bonus('paramConfig/template/detail'),
            meta: {
              title: '奖金模板审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/bonus/templateApproval'
            }
          },
          {
            path: 'levelApproval',
            name: 'levelApproval',
            component: chunk.flowApproval('bonus/levelPoints/index'),
            meta: {
              title: '职级点数审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050200'
            }
          },
          {
            path: 'levelApproval/audit',
            name: 'levelPointsAudit',
            component: chunk.bonus('paramConfig/levelPoints/detail'),
            meta: {
              title: '职级点数审批',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'levelApproval/detail',
            name: 'levelPointsAuditDetail',
            component: chunk.bonus('paramConfig/levelPoints/detail'),
            meta: {
              title: '职级点数审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/bonus/levelApproval'
            }
          },
          {
            path: 'incentiveApprove',
            name: 'incentiveApprove',
            component: chunk.flowApproval('bonus/incentiveApprove/incentiveApprove'),
            meta: {
              title: '在销激励审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050400'
            }
          },

          {
            path: 'incentiveApprove/detail',
            name: 'incentiveApprove/detail',
            component: chunk.bonus('incentive/incentiveSee'),
            meta: {
              title: '在销激励审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/bonus/incentiveApprove'
            }
          },
          {
            path: 'allowanceApprove',
            name: 'allowanceApprove',
            component: chunk.flowApproval('bonus/allowanceApprove/allowanceApprove'),
            meta: {
              title: '项目津贴审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050500'
            }
          },
          {
            path: 'allowanceApprove/detail',
            name: 'allowanceApprove/detail',
            component: chunk.bonus('allowance/allowanceSee'),
            meta: {
              title: '项目津贴审批详情',
              sideBar: false,
              isbuild: 'nobuildpage',
              noAuthor: true,
              parentPath: '/flowApproval/bonus/allowanceApprove'
            }
          },
          {
            path: 'yearendApproval',
            name: 'yearendApproval',
            component: chunk.modules('bonus/yearend/index'),
            meta: {
              title: '年底奖金审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206050600'
            }
          },
          {
            path: 'yearendApproval/detail',
            name: 'yearendApprovalDetail',
            component: chunk.modules('bonus/yearend/detail'),
            meta: {
              title: '年底奖金审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/bonus/yearendApproval'
            }
          }
        ]
      },
      {
        path: 'approveMgr',
        component: chunk.modules('middleView'),
        name: 'approveMgr',
        meta: {
          title: '审批管理',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206060000'
        },
        children: [
          {
            path: 'billApprovalManager',
            name: 'billApprovalManager',
            component: chunk.bonus('bill/index'),
            meta: {
              title: '奖金单审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060100'
            }
          },
          {
            path: 'billApproval/detail',
            name: 'billApprovalManagerDetail',
            component: chunk.bonus('bill/detail'),
            meta: {
              title: '奖金单审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/approveMgr/billApprovalManager'
            }
          },
          {
            path: 'templateApprovalManager',
            name: 'templateApprovalManager',
            component: chunk.flowApproval('bonus/template/index'),
            meta: {
              title: '奖金模板审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060400'
            }
          },
          {
            path: 'templateApproval/detail',
            name: 'bonusTemplateApprovalDetail',
            component: chunk.bonus('paramConfig/template/detail'),
            meta: {
              title: '奖金模板审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/approveMgr/templateApprovalManager'
            }
          },
          {
            path: 'levelApprovalManager',
            name: 'levelApprovalManager',
            component: chunk.flowApproval('bonus/levelPoints/index'),
            meta: {
              title: '职级点数审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060500'
            }
          },
          {
            path: 'levelApproval/detail',
            name: 'levelPointsApprovalDetail',
            component: chunk.bonus('paramConfig/levelPoints/detail'),
            meta: {
              title: '职级点数审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/approveMgr/levelApprovalManager'
            }
          },
          {
            path: 'incentiveMar',
            name: 'incentiveMar',
            component: chunk.flowApproval('bonus/incentiveApprove/incentiveApprove'),
            meta: {
              title: '在销激励审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060200'
            }
          },
          {
            path: 'incentiveApproveMar/detail',
            name: 'incentiveApproveMar/detail',
            component: chunk.bonus('incentive/incentiveSee'),
            meta: {
              title: '在销激励审批详情',
              sideBar: false,
              noAuthor: true,
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/approveMgr/incentiveMar'
            }
          },
          {
            path: 'allowanceMar',
            name: 'allowanceMar',
            component: chunk.flowApproval('bonus/allowanceApprove/allowanceApprove'),
            meta: {
              title: '项目津贴审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060300'
            }
          },
          {
            path: 'allowanceMar/detail',
            name: 'allowanceMar/detail',
            component: chunk.bonus('allowance/allowanceSee'),
            meta: {
              title: '项目津贴审批详情',
              sideBar: false,
              isbuild: 'nobuildpage',
              noAuthor: true,
              parentPath: '/flowApproval/approveMgr/allowanceMar'
            }
          },
          {
            path: 'cardAuditManagement',
            name: 'cardAuditManagement',
            component: chunk.backStage('companyCard/cardAuditManagement/index'),
            meta: {
              title: '名片审批管理',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060600'
            }
          },
          {
            path: 'orderAdjustApproveManagement',
            name: 'orderAdjustApproveManagement',
            component: chunk.flowApproval('orderAdjustApproveManagement/index'),
            meta: {
              title: '订单调整审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060800'
            }
          },
          {
            path: 'orderAdjust/subApproveDetail',
            component: chunk.flowApproval('orderAdjustApprove/subApprove/detail'),
            name: 'orderAdjust/subApproveDetail',
            meta: {
              auth: false,
              title: '认购调整单详情',
              sideBar: false,
              noAuthor: true, //是否需要权限
              parentPath: '/flowApproval/approveMgr/orderAdjustApproveManagement',
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'orderAdjust/contractApproveDetail',
            component: chunk.flowApproval('orderAdjustApprove/contractApprove/detail'),
            name: 'orderAdjust/contractApproveDetail',
            meta: {
              auth: false,
              title: '签约调整单详情',
              parentPath: '/flowApproval/approveMgr/orderAdjustApproveManagement',
              sideBar: false,
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'reportApprove',
            name: 'reportApprove',
            component: chunk.flowApproval('reportApprove/index'),
            meta: {
              title: '置业计划书审批管理',
              keepAlive: true,
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206060900'
            }
          },
          {
            path: 'reportApprove/ArticleReviewDetail',
            component: chunk.marketingCenter('propertyReport/articleReview/viewArticleReview'),
            name: 'reportApproveArticleReview',
            meta: {
              title: '审核文章内容',
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage',
              parentPath: '/flowApproval/approveMgr/reportApprove'
            }
          }
        ]
      },
      {
        path: 'orderAdjustApprove',
        component: chunk.modules('middleView'),
        name: 'orderAdjustApprove',
        meta: {
          title: '订单调整审批',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206090000'
        },
        children: [
          {
            path: 'subApprove',
            name: 'subApprove',
            component: chunk.flowApproval('orderAdjustApprove/subApprove/index'),
            meta: {
              title: '认购调整单审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206090100'
            }
          },
          {
            path: 'subApproveDetail',
            component: chunk.flowApproval('orderAdjustApprove/subApprove/detail'),
            name: 'subApproveDetail',
            meta: {
              auth: false,
              title: '认购调整单详情',
              sideBar: false,
              noAuthor: true, //是否需要权限
              parentPath: '/flowApproval/orderAdjustApprove/subApprove',
              isbuild: 'nobuildpage'
            }
          },
          {
            path: 'contractApprove',
            name: 'contractApprove',
            component: chunk.flowApproval('orderAdjustApprove/contractApprove/index'),
            meta: {
              title: '签约调整单审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206090200'
            }
          },
          {
            path: 'contractApproveDetail',
            component: chunk.flowApproval('orderAdjustApprove/contractApprove/detail'),
            name: 'contractApproveDetail',
            meta: {
              auth: false,
              title: '签约调整单详情',
              parentPath: '/flowApproval/orderAdjustApprove/contractApprove',
              sideBar: false,
              noAuthor: true, //是否需要权限
              isbuild: 'nobuildpage'
            }
          }
        ]
      },
      {
        path: 'returnNotePurchase',
        component: chunk.modules('middleView'),
        name: 'returnNotePurchase',
        meta: {
          title: '退购退签审批',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0206100000'
        },
        children: [
          {
            path: 'returnNote',
            name: 'returnNote',
            component: chunk.flowApproval('orderAdjustApprove/returnNote/index'),
            meta: {
              title: '退签单审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206100200'
            }
          },

          {
            path: 'returnPurchase',
            name: 'returnPurchase',
            component: chunk.flowApproval('orderAdjustApprove/returnPurchase/index'),
            meta: {
              title: '退购单审批',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0206100100'
            }
          }
        ]
      }
    ]
  },

  // 佣金管理
  {
    path: '/commission',
    component: chunk.modules('middleView'),
    name: 'commission',
    meta: {
      title: '佣金管理',
      icon: 'icon-icon_money_manage',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0210000000'
    },
    children: [
      {
        path: 'rule',
        component: chunk.modules('middleView'),
        name: 'rule',
        meta: {
          title: '佣金规则',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0210010000'
        },
        children: [
          {
            path: 'create',
            name: 'create',
            component: chunk.commission('rule/create/index'),
            meta: {
              title: '佣金规则发起',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0210010100'
            }
          },
          {
            path: 'audit',
            name: 'audit',
            component: chunk.commission('rule/audit/index'),
            meta: {
              title: '佣金规则审核',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0210010200'
            }
          }
        ]
      },
      {
        path: 'information',
        name: 'information',
        component: chunk.commission('information/index'),
        meta: {
          title: '佣金信息',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0210020000'
        }
      },
      {
        path: 'settlement',
        name: 'commissionSettlement',
        component: chunk.commission('information/settlement'),
        meta: {
          title: '佣金结算',
          parentPath: '/commission/information',
          isbuild: 'nobuildpage',
          noAuthor: true
        }
      },
      {
        path: 'detail',
        name: 'commissionDetail',
        component: chunk.commission('information/detail'),
        meta: {
          title: '佣金明细',
          parentPath: '/commission/information',
          isbuild: 'nobuildpage',
          noAuthor: true
        }
      },
      {
        path: 'payment',
        name: 'payment',
        component: chunk.commission('payment/index'),
        meta: {
          title: '佣金回款',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0210030000'
        }
      }
    ]
  },
  // 奖金管理
  {
    path: '/bonus',
    component: chunk.modules('middleView'),
    name: 'bonusManagement',
    meta: {
      title: '奖金管理',
      icon: 'icon-icon_money_else',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0214000000'
    },
    children: [
      {
        path: 'yearend',
        name: 'yearend',
        component: chunk.modules('bonus/yearend/index'),
        meta: {
          title: '年底奖金',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0214010000'
        }
      },
      {
        path: 'yearend/edit',
        name: 'yearendEdit',
        component: chunk.modules('bonus/yearend/detail'),
        meta: {
          title: '年底奖金编辑',
          sideBar: false,
          noAuthor: true,
          isbuild: 'nobuildpage',
          parentPath: '/bonus/yearend'
        }
      },
      {
        path: 'yearend/detail',
        name: 'yearendDetail',
        component: chunk.modules('bonus/yearend/detail'),
        meta: {
          title: '年底奖金明细',
          sideBar: false,
          noAuthor: true,
          isbuild: 'nobuildpage',
          parentPath: '/bonus/yearend'
        }
      },
      {
        path: 'deferApprove',
        name: 'deferApprove',
        component: chunk.modules('bonus/deferApprove/index'),
        meta: {
          title: '延期申请审批',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0214020000'
        }
      }
    ]
  },
  // 客户管理
  {
    path: '/customerManage',
    component: chunk.modules('middleView'),
    name: 'customerManage',
    meta: {
      title: '客户管理',
      icon: 'icon-kehuguanli',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0216000000'
    },
    children: [
      {
        path: 'companyCustomer',
        name: 'companyCustomer',
        component: chunk.customerManage('companyCustomer/index'),
        meta: {
          title: '公司客户池',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0216010000'
        }
      },
      {
        path: 'companyCustomer/customerLog',
        name: 'customerLog',
        component: chunk.customerManage('companyCustomer/customerLog/index'),
        meta: {
          title: '抢客记录',
          sideBar: false,
          noAuthor: true,
          isbuild: 'nobuildpage',
          parentPath: '/customerManage/companyCustomer'
        }
      },
      {
        path: 'customerBig',
        component: chunk.customerManage('customerBig/customerBig'),
        name: 'customerBig',
        meta: {
          title: '客户列表',
          isbuild: 'nobuildpage',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0216020000'
        }
      }
    ]
  },
  // 线索管理
  {
    path: '/clueManage',
    component: chunk.modules('middleView'),
    name: 'clueManage',
    meta: {
      title: '线索管理',
      icon: 'icon-icon_clue',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0213000000'
    },
    children: [
      {
        path: 'clueReport',
        component: chunk.clueManage('clueReport'),
        name: 'clueReport',
        meta: {
          auth: false,
          title: '线索记录',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0213010000'
        }
      },
      {
        path: 'privacyNumber',
        component: chunk.clueManage('privacyNumber/privacyNumber'),
        name: 'privacyNumber',
        meta: {
          auth: false,
          title: '隐私号列表',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0213050000'
        }
      },
      {
        path: 'privacyCallRecord',
        // component: chunk.clueManage('privacyCallRecord/privacyCallRecord'),
        component: chunk.clueManage('callRecord'),
        name: 'privacyCallRecord',
        meta: {
          title: '隐私号通话记录',
          isbuild: 'nobuildpage',
          parentPath: '/clueManage/privacyNumber',
          noAuthor: true //是否需要权限
        }
      },
      {
        path: 'clueImport',
        component: chunk.clueManage('clueImport/index'),
        name: 'clueImport',
        meta: {
          auth: false,
          title: '线索导入',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0213030000'
        }
      },

      {
        path: 'caseBusiness',
        component: chunk.modules('middleView'),
        name: 'caseBusiness',
        meta: {
          title: '案场承接业务',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0213090000'
        },
        children: [
          {
            path: 'caseReceiverConfig',
            component: chunk.clueManage('caseReceiverConfig/index'),
            name: 'caseReceiverConfig',
            meta: {
              auth: false,
              title: '案场承接配置',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0213090000'
            }
          },
          {
            path: 'caseReceiver',
            component: chunk.clueManage('receiver'),
            name: 'caseReceiver',
            meta: {
              title: '承接人详情',
              isbuild: 'nobuildpage',
              parentPath: '/clueManage/caseBusiness/caseReceiverConfig',
              noAuthor: true //是否需要权限
            }
          },
          {
            path: 'receiver',
            component: chunk.clueManage('receiver'),
            name: 'receiver',
            meta: {
              auth: false,
              title: '承接人列表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0213020000'
            }
          },
          {
            path: 'callRecord',
            name: 'callRecord',
            component: chunk.clueManage('callRecord'),
            meta: {
              title: '通话记录',
              isbuild: 'nobuildpage',
              parentPath: '/clueManage/caseBusiness/receiver',
              noAuthor: true //是否需要权限
            }
          },
          // {
          //   path: 'clueImport',
          //   component: chunk.clueManage('clueImport/index'),
          //   name: 'clueImport',
          //   meta: {
          //     auth: false,
          //     title: '线索导入',
          //     sideBar: true,
          //     isbuild: 'nobuildpage',
          //     permissionCode: '0213030000'
          //   }
          // },
          {
            path: 'clueImportDetail',
            name: 'clueImportDetail',
            component: chunk.clueManage('clueImport/detail'),
            meta: {
              title: '线索导入详情',
              isbuild: 'nobuildpage',
              parentPath: '/clueManage/clueImport',
              noAuthor: true //是否需要权限
            }
          },
          {
            path: 'importClientStatistics',
            component: chunk.clueManage('importClientStatistics/index'),
            name: 'importClientStatistics',
            meta: {
              auth: false,
              title: '线索导入统计',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0213040000'
            }
          }
        ]
      },
      {
        path: 'externalCallSignMar',
        component: chunk.modules('middleView'),
        name: 'externalCallSignMar',
        meta: {
          title: '外呼号业务',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0213060000'
        },
        children: [
          {
            path: 'externalCallSign',
            component: chunk.clueManage('externalCallSign/externalCallSign'),
            name: 'externalCallSign',
            meta: {
              auth: false,
              title: '外呼号配置列表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0213060000'
            }
          },
          {
            path: 'buyRecord',
            name: 'buyRecord',
            component: chunk.clueManage('externalCallSign/buyRecord'),
            meta: {
              title: '购买记录',
              isbuild: 'nobuildpage',
              parentPath: '/clueManage/externalCallSignMar/externalCallSign',
              noAuthor: true //是否需要权限
            }
          },
          {
            path: 'externalCallSignCallRecord',
            // component: chunk.clueManage('privacyCallRecord/privacyCallRecord'),
            component: chunk.clueManage('callRecord'),
            name: 'externalCallSignCallRecord',
            meta: {
              title: '通话记录',
              isbuild: 'nobuildpage',
              parentPath: '/clueManage/externalCallSignMar/externalCallSign',
              noAuthor: true //是否需要权限
            }
          }
        ]
      }
    ]
  },

  // 营销管理
  {
    path: '/marketing',
    component: chunk.modules('middleView'),
    name: 'marketing',
    meta: {
      title: '营销管理',
      icon: 'icon-icon_market',
      sideBar: true,
      isbuild: 'nobuildpage',
      permissionCode: '0215000000'
    },
    children: [
      {
        path: 'activity',
        component: chunk.marketing('activity/activity'),
        name: 'activity',
        meta: {
          auth: false,
          title: '活动管理',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0215010000'
        }
      },
      {
        path: 'activityData',
        component: chunk.marketing('activity/activityData'),
        name: 'activityData',
        meta: {
          title: '活动数据',
          isbuild: 'nobuildpage',
          parentPath: '/marketing/activity',
          noAuthor: true //是否需要权限
        }
      },
      {
        path: 'activityDetail',
        component: chunk.marketing('activity/activityDetail'),
        name: 'activityDetail',
        meta: {
          title: '新增/编辑活动',
          isbuild: 'nobuildpage',
          parentPath: '/marketing/activity',
          noAuthor: true //是否需要权限
        }
      },
      {
        path: 'purse',
        component: chunk.modules('middleView'),
        name: 'purse',
        meta: {
          title: '钱包管理',
          icon: 'md-cube',
          sideBar: true,
          isbuild: 'nobuildpage',
          permissionCode: '0215020000'
        },
        children: [
          {
            path: 'purseReport',
            name: 'purseReport',
            component: chunk.marketing('activity/purseManage/purseReport'),
            meta: {
              title: '钱包报表',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0215020100'
            }
          },
          {
            path: 'purseWater',
            name: 'purseWater',
            component: chunk.marketing('activity/purseManage/purseWater'),
            meta: {
              title: '提现流水',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0215020200'
            }
          },
          {
            path: 'purseCount',
            name: 'purseCount',
            component: chunk.marketing('activity/purseManage/purseCount'),
            meta: {
              title: '钱包统计',
              sideBar: true,
              isbuild: 'nobuildpage',
              permissionCode: '0215020300'
            }
          }
        ]
      }
    ]
  }
]
router = router.concat(routerAll)
console.log(router)
export default router
